﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Text_Adventures
{
    public class World
    {        
        public  Dictionary<string, Room> _World = new Dictionary<string, Room>();

        public World()
        {
            _World = new Dictionary<string, Room>();
            Create_World();
        }


        private void Create_World()
        {
            StreamReader sr = new StreamReader(@"Data\Rooms.txt");

            while (!sr.EndOfStream)
            {
                Room room = new Room(sr);
                if(!sr.EndOfStream)
                _World.Add(room.Name, room);
            }
        }
    }
}
